Telegram Group & Telegram Channel
30. Number pattern 5.

12345
1234
123
12
1
12
123
1234
12345


class NumberPat5
{

public static void main(String arg[])
{

int ck = 0, c = 2;

while (c > 0)
{

if (ck == 0)
{

for (int i = 1, r = 5; i <= 5; i++, r--)
{

for (int j = 1; j <= r; j++)
{

System.out.print(j);

}

System.out.println();

}

ck++;

}
else
{

for (int i = 2; i <= 5; i++)
{

for (int j = 1; j <= i; j++)
{

System.out.print(j);

}

System.out.println();
}
}

c--;
}

}
}

@java_codings



tg-me.com/java_codings/42
Create:
Last Update:

30. Number pattern 5.

12345
1234
123
12
1
12
123
1234
12345


class NumberPat5
{

public static void main(String arg[])
{

int ck = 0, c = 2;

while (c > 0)
{

if (ck == 0)
{

for (int i = 1, r = 5; i <= 5; i++, r--)
{

for (int j = 1; j <= r; j++)
{

System.out.print(j);

}

System.out.println();

}

ck++;

}
else
{

for (int i = 2; i <= 5; i++)
{

for (int j = 1; j <= i; j++)
{

System.out.print(j);

}

System.out.println();
}
}

c--;
}

}
}

@java_codings

BY Advance Java πŸ‘¨β€πŸ’»


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/java_codings/42

View MORE
Open in Telegram


Advance Java ‍ Telegram | DID YOU KNOW?

Date: |

The S&P 500 slumped 1.8% on Monday and Tuesday, thanks to China Evergrande, the Chinese property company that looks like it is ready to default on its more-than $300 billion in debt. Cries of the next Lehman Brothersβ€”or maybe the next Silverado?β€”echoed through the canyons of Wall Street as investors prepared for the worst.

The SSE was the first modern stock exchange to open in China, with trading commencing in 1990. It has now grown to become the largest stock exchange in Asia and the third-largest in the world by market capitalization, which stood at RMB 50.6 trillion (US$7.8 trillion) as of September 2021. Stocks (both A-shares and B-shares), bonds, funds, and derivatives are traded on the exchange. The SEE has two trading boards, the Main Board and the Science and Technology Innovation Board, the latter more commonly known as the STAR Market. The Main Board mainly hosts large, well-established Chinese companies and lists both A-shares and B-shares.

Advance Java ‍ from ru


Telegram Advance Java πŸ‘¨β€πŸ’»
FROM USA